package freedom.solution.app.restaurante.datatypes;

import android.provider.BaseColumns;

public class DBtables {
	
	 DBtables(){
         
     }
     
     public static final class Usuario implements BaseColumns{
             
             private Usuario(){}
             
             public static final String TAG = "usuario";
             
             public static final String PK_USUARIO = "usuario";
             public static final String IDPERFIL = "id_perfil";
             public static final String IDESTADO = "id_estado";
             public static final String CONTRASENA = "contrasena";
             
             public static final String CREATE_STATEMENT ="CREATE TABLE "+TAG+" ("+PK_USUARIO	
             +" CHAR(10) PRIMARY KEY,"+IDPERFIL+" INTEGER,"+IDESTADO+" INTEGER,"+CONTRASENA+" CHAR(30));";
             
     }
     
     
     
     public static final class Categoria implements BaseColumns{
             
             private Categoria(){}
             
             public static final String TAG = "categoria";

             public static final String PK_CATEGORIA = "id_categoria";
             public static final String FAMILIA = "id_familia";
             public static final String NOMBRE = "nombre";
             
             public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_CATEGORIA
                     +" INTEGER PRIMARY KEY,"+FAMILIA+" INTEGER,"+NOMBRE+" CHAR(20));";
     }
     
     public static final class DetallePago implements BaseColumns{
             
             private DetallePago(){}
             
             public static final String TAG = "detallepago";

             public static final String PK_IDDETPAGO = "id_detalle_pago";
             public static final String ID_PAGO = "id_pago";
             public static final String ID_PRODUCTO = "id_producto";
             public static final String CANTIDAD = "cantidad";
             public static final String PRECIO_UNITARIO = "preciounitario";
             public static final String SUBTOTAL = "subtotal";
             
             
             public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_IDDETPAGO
                     +" INTEGER PRIMARY KEY,"+ID_PAGO+" INTEGER,"+CANTIDAD+" INTEGER,"
                     +PRECIO_UNITARIO+" NUMERIC(9,2),"+SUBTOTAL+" NUMERIC(9,2));";
             
     }
     
     public static final class DetallePedido implements BaseColumns{
             
             private DetallePedido(){}
             
             public static final String TAG = "detallepedido";
             
             public static final String  PK_IDETPEDIDO = "id_detalle_pedido";
             public static final String IDPEDIDO = "id_pedido";
             public static final String IDPRODUCTO = "id_producto";
             public static final String IDESTADO = "id_estado";
             public static final String CANTIDAD = "cantidad";
             public static final String PRECIO_UNITARIO = "precio_unitario";
             public static final String SUBTOTAL = "subtotal";
             
             
             
             
             public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_IDETPEDIDO
                     +" INTEGER PRIMARY KEY,"+IDPEDIDO+" INTEGER,"+IDPRODUCTO+" INTEGER,"
                     +IDESTADO+" INTEGER,"+CANTIDAD+" INTEGER,"+PRECIO_UNITARIO+" NUMERIC(9,2),"
                     +SUBTOTAL+" NUMERIC(9,2));";
             
     }
     
     
     public static final class Distrito implements BaseColumns{
             
             private Distrito(){}
             
             public static final String TAG = "distrito";
             
             public static final String PK_ID_DISTRITO = "id_distrito";
             public static final String NOMBRE = "nombre";
             
             public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_ID_DISTRITO
                     +" INTEGER PRIMARY KEY, "+NOMBRE+" CHAR(20));";
             
     }
     
     public static final class Estado implements BaseColumns{
         
         private Estado(){}
         
         public static final String TAG = "estado";
         
         public static final String PK_ID_ESTADO = "id_estado";
         public static final String NOMBRE = "nombre";
         public static final String DESCRIPCION = "descripcion";
        
         public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_ID_ESTADO
                 +" INTEGER PRIMARY KEY, "+NOMBRE+" CHAR(15), "+DESCRIPCION+" CHAR(30));";
         
 }
     
 public static final class Familia implements BaseColumns{
         
         private Familia(){}
         
         public static final String TAG = "familia";
         
         public static final String PK_ID_FAMILIA = "id_familia";
         public static final String NOMBRE = "nombre";
        
       
         public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_ID_FAMILIA
                 +" INTEGER PRIMEY KEY, "+NOMBRE+" CHAR(20));";
         
 }
 
 public static final class HistorialMesa implements BaseColumns{
     
     private HistorialMesa(){}
     
     public static final String TAG = "historialmesa";
     
     public static final String PK_ID_HISTOMESA = "id_historial_mesa";
     public static final String ID_MESA= "id_mesa";
     public static final String FECHA_INICIO= "fecha_inicio";
     public static final String FECHA_FIN= "fecha_fin";
     public static final String OCUPANTES= "ocupantes";
     
     
     
     public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_ID_HISTOMESA
             +" INTEGER PRIMARY KEY, "+ID_MESA+" INTEGER,"+FECHA_INICIO+" DATETIME,"+FECHA_FIN+" DATETIME,"+
    		 OCUPANTES+" INTEGER);";
     
}
 
 public static final class Igv implements BaseColumns{
     
     private Igv(){}
     
     public static final String TAG = "igv";
     
     public static final String PK_IGV = "id_igv";
     public static final String VALOR = "valor";
     
     public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_IGV
             +" INTEGER PRIMARY KEY, "+VALOR+" INTEGER);";
     
}
 
public static final class Mesa implements BaseColumns{
     
     private Mesa(){}
     
     public static final String TAG = "mesa";
     
     public static final String PK_IDMESA = "id_mesa";
     public static final String IDESTADO= "id_estado";
     public static final String CAPACIDAD = "capacidad";
     public static final String NUMERO= "numero";
     
     
     public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_IDMESA
             +" INTEGER PRIMARY KEY, "+IDESTADO+" INTEGER,"+CAPACIDAD+" INTEGER,"+NUMERO+" CHAR(3));";
     
}

public static final class Moneda implements BaseColumns{
    
    private Moneda(){}
    
    public static final String TAG = "moneda";
    
    public static final String PK_IDMONEDA = "id_moneda";
    public static final String NOMBRE = "nombre";
    public static final String VALOR = "valor";
    
    
    public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_IDMONEDA
            +" INTEGER PRIMARY KEY, "+NOMBRE+" CHAR(10),"+VALOR+" NUMERIC(9,2));";
    
}

public static final class Mozo implements BaseColumns{
    
    private Mozo(){}
    
    public static final String TAG = "mozo";
    
    public static final String PK_ID_MOZO = "id_mozo";
    public static final String ID_RESTAURANTE = "id_restaurante";
    public static final String USUARIO = "usuario";
  
    public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_ID_MOZO
            +" INTEGER PRIMARY KEY, "+ID_RESTAURANTE+" INTEGER, "+USUARIO+" CHAR(10));";
    
}


public static final class Pago implements BaseColumns{
    
    private Pago(){}
    
    public static final String TAG = "pago";
    
    public static final String PK_ID_PAGO= "id_pago";
    public static final String ID_PEDIDO = "id_pedido";
    public static final String FECHA = "fecha";
    public static final String TOTAL= "total";
    public static final String TIPO = "tipo";
  
   
    
    public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_ID_PAGO
            +" INTEGER PRIMARY KEY, "+ID_PEDIDO+" INTEGER, "+FECHA+" DATETIME, "+TOTAL+" NUMERIC(9,2),"+TIPO+" CHAR(10));";
    
}

public static final class Pedido implements BaseColumns{
    
    private Pedido(){}
    
    public static final String TAG = "pedido";
    
    public static final String PK_ID_PEDIDO = "id_pedido";
    public static final String FK_ID_MOZO= "id_mozo";
    public static final String FK_ID_MESA= "id_mesa";
    public static final String FK_ID_ESTADO= "id_estado";
    public static final String FECHA= "fecha";
    public static final String TOTAL= "total";
    public static final String OBSERVACION= "observacion";
    
    public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_ID_PEDIDO
            +" INTEGER PRIMARY KEY, "+FK_ID_MOZO+" INTEGER,"+ FK_ID_MESA+" INTEGER,"+FK_ID_ESTADO+" INTEGER,"+FECHA
            +" DATETIME,"+TOTAL+" NUMERIC(9,2),"+OBSERVACION+" CHAR(30));";
    
}

public static final class Perfil implements BaseColumns{
    
    private Perfil(){}
    
    public static final String TAG = "perfil";
    
    public static final String PK_ID_PERFIL = "id_perfil";
    public static final String NOMBRE= "nombre";
    
    
    public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_ID_PERFIL
            +" INTEGER PRIMARY KEY, "+NOMBRE+" CHAR(20));";
    
}

public static final class Permiso implements BaseColumns{
    
    private Permiso(){}
    
    public static final String TAG = "permiso";

    public static final String PK_ID_PERMISO = "id_permiso";
    public static final String NOMBRE = "nombre";
    public static final String URL = "url";

    
    public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_ID_PERMISO
            +" INTEGER PRIMARY KEY,"+NOMBRE+" char(20),"+URL+" CHAR(50));";
}

public static final class PermisoxPerfil implements BaseColumns{
    
    private PermisoxPerfil(){}
    
    public static final String TAG = "permisoxperfil";

    public static final String FK_ID_PERMISO = "id_permiso";
    public static final String FK_ID_PERFIL = "id_perfil";

    
    public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+FK_ID_PERMISO
            +" INTEGER ,"+FK_ID_PERFIL+" INTEGER);";
}

public static final class Presentacion implements BaseColumns{
    
    private Presentacion(){}
    
    public static final String TAG = "presentacion";

    public static final String PK_ID_PRESENTACION = "id_presentacion";
    public static final String NOMBRE = "nombre";

    
    public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_ID_PRESENTACION
            +" INTEGER PRIMARY KEY,"+NOMBRE+" char(20));";
}

public static final class Producto implements BaseColumns{
    
    private Producto(){}
    
    public static final String TAG = "producto";

    public static final String PK_ID_PRODUCTO = "id_producto";
    public static final String FK_ID_SUBCATEGORIA = "id_subcategoria";
    public static final String FK_ID_PRESENTACION = "id_presentacion";
    public static final String FK_ID_ESTADO = "id_estado";
    public static final String NOMBRE = "nombre";
    public static final String DESCRIPCION = "descripcion";
    public static final String FOTO = "foto";
    public static final String PRECIO = "precio";
    public static final String INGREDIENTES = "ingredientes";
    
    
    
    
    public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_ID_PRODUCTO
            +" INTEGER PRIMARY KEY,"+FK_ID_SUBCATEGORIA+" INTEGER,"+FK_ID_PRESENTACION+" INTEGER,"+FK_ID_ESTADO
            +" INTEGER,"+ NOMBRE+" CHAR(30)," +DESCRIPCION+" CHAR(30),"+FOTO+" char(15),"+PRECIO+" NUMERIC(9,2),"
            +" INGREDIENTES"+" CHAR(50));";
}

public static final class ProductoXRestaurante implements BaseColumns{
    
    private ProductoXRestaurante(){}
    
    public static final String TAG = "productoxrestaurante";

    public static final String FK_ID_PRODUCTO = "id_producto";
    public static final String FK_ID_RESTAURANTE = "id_restaurante";
    public static final String PRECIO_VENTA = "precio_venta";
    public static final String STOCK = "stock";
    
    
    
    
    public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+FK_ID_PRODUCTO
            +" INTEGER PRIMARY KEY,"+FK_ID_RESTAURANTE+" INTEGER,"+PRECIO_VENTA+" NUMERIC(9,2),"+STOCK
            +" INTEGER);";
}

public static final class Restaurante implements BaseColumns{
    
    private Restaurante(){}
    
    public static final String TAG = "restaurante";

    public static final String PK_ID_RESTAURANTE = "id_restaurante";
    public static final String DIRECCION = "direccion";
    public static final String ID_DISTRITO = "id_distrito";
    
    
    
    
    public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_ID_RESTAURANTE
            +" INTEGER PRIMARY KEY,"+DIRECCION+" char(50),"+ID_DISTRITO+"  INTEGER);";
}

public static final class Subcategoria implements BaseColumns{
    
    private Subcategoria(){}
    
    public static final String TAG = "subcategoria";

    public static final String PK_ID_SUBCATEGORIA = "id_subcategoria";
    public static final String ID_CATEGORIA = "id_categoria";
    public static final String NOMBRE = "nombre";
    
    
    
    
    public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_ID_SUBCATEGORIA
            +" INTEGER PRIMARY KEY,"+ID_CATEGORIA+" INTEGER,"+NOMBRE+"  char(20));";
}

public static final class TipoPago implements BaseColumns{
    
    private TipoPago(){}
    
    public static final String TAG = "tipopago";

    public static final String PK_ID_TIPO_PAGO = "id_tipo_pago";
    public static final String NOMBRE = "nombre";
    public static final String DESCRIPCION = "descripcion";
    public static final String RECARGO = "recargo";
    
    
    public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_ID_TIPO_PAGO
            +" INTEGER PRIMARY KEY,"+NOMBRE+" char(20),"+DESCRIPCION+" char(20),"+RECARGO+" NUMERIC(9,2));";
}

public static final class TipoPagoXPago implements BaseColumns{
    
    private TipoPagoXPago(){}
    
    public static final String TAG = "tipopagoxpago";

    public static final String PK_ID_PAGO = "ID_PAGO";
    public static final String ID_TIPO_PAGO = "ID_TIPO_PAGO";
    public static final String IMPORTE = "importe";
    
    
    public static final String CREATE_STATEMENT = "CREATE TABLE "+TAG+" ("+PK_ID_PAGO
            +" INTEGER PRIMARY KEY,"+ID_TIPO_PAGO+" INTEGER,"+IMPORTE+" NUMERIC(9,2));";
}

}
